package com.yashi.service;

import java.util.List;

import com.github.pagehelper.PageInfo;
import com.yashi.entity.TbDepartment;

public interface DepartmentService {

	/**
	 * 添加部门信息
	 * @param department
	 * @return
	 */
	Integer insertDept(TbDepartment department)throws Exception;

	/**
	 * 查询所有部门
	 * @return
	 */
	PageInfo<TbDepartment> findDeptList1(Integer pageNum)throws Exception;

	/**
	 * 更新部门信息
	 * @param department
	 * @return
	 */
	Integer updateDept(TbDepartment department)throws Exception;

	/**
	 * 删除部门（逻辑删除）
	 * @param department
	 * @return
	 */
	Integer deleteDept(TbDepartment department)throws Exception ;
	
	/**
	 * 根据部门ID查询
	 * @param deptId
	 * @return
	 */
	TbDepartment findDeptById(String deptId)throws Exception;

	/**
	 * 模糊查询
	 * @param deptName
	 * @return
	 */
	PageInfo<TbDepartment> selectDeptByName(String deptName,Integer pageNum) throws Exception;

	/**
	 * App端查询所有部门
	 * @return
	 */
	List<TbDepartment> findDeptList();

	/**
	 * app端模糊查询
	 * @param tbDept
	 * @return
	 */
	List<TbDepartment> selectDeptByName1(TbDepartment tbDept);

	/**
	 * 在添加用户的时候查询部门
	 * @return
	 */
	List<TbDepartment> findDeptListToAdd();

}
